﻿<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@page isELIgnored="false"%>
<c:set var="rootpath" value="${pageContext.request.contextPath}"></c:set>

<!DOCTYPE html>
<!-- saved from url=(0042)http://v3.bootcss.com/examples/dashboard/# -->
<html lang="en">

<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<link rel="icon" href="http://v3.bootcss.com/favicon.ico">

<title>Dashboard Template for Bootstrap</title>

<!-- Bootstrap core CSS -->
<link href="${rootpath }/css/bootstrap.min.css" rel="stylesheet">

<!-- Custom styles for this template -->
<link href="${rootpath }/css/dashboard.css" rel="stylesheet">

<!-- Just for debugging purposes. Don't actually copy these 2 lines! -->
<!--[if lt IE 9]><script src="${rootpath }/assets/js/ie8-responsive-file-warning.js"></script><![endif]-->
<script src="${rootpath }/js/ie-emulation-modes-warning.js"></script>

<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
      <script src="http://cdn.bootcss.com/html5shiv/3.7.0/html5shiv.js"></script>
      <script src="http://cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
</head>

<body>
	<nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
		<div class="container-fluid">
			<div class="navbar-header">
				<button type="button" class="navbar-toggle collapsed"
					data-toggle="collapse" data-target="#navbar" aria-expanded="false"
					aria-controls="navbar">
					<span class="sr-only">Toggle navigation</span> <span
						class="icon-bar"></span> <span class="icon-bar"></span> <span
						class="icon-bar"></span>
				</button>
				<a class="navbar-brand" href="console">blog后台管理</a>
			</div>
		</div>
	</nav>

	<div class="container-fluid">
		<div class="row">
			<div class="col-sm-3 col-md-2 sidebar">
				<ul class="nav nav-sidebar">
					<!--这里添加控制选项-->
					<li ><a href="console">控制台</a></li>
					<li class="active"><a data-toggle="collapse" data-target="#blogConsole"
						href="console_blog_list">blog管理</a>
						<ul class="nav nav-sidebar collapse in"
							style="padding-left: 50px; margin-bottom: 0;" id="blogConsole">
							<li class="active"><a href="console_blog_list">blog列表</a></li>
							<li><a href="console_blog_add">添加blog</a></li>
						</ul></li>
					<li><a href="console_notice">公告栏管理</a></li>
				</ul>
			</div>
			<div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">
				<!--这里是主要内容-->
				<table class="table table-bordered">

					<thead>
						<tr>
							<th>编号</th>
							<th>标题</th>
							<th>发布时间</th>
							<th>阅读数</th>
							<th>评论数</th>
							<th>是否发布</th>
							<th>操作</th>
						</tr>
					</thead>
					<tbody>
						<c:forEach var="essay" items="${essays}">
							<tr>
								<td>${essay.id }</td>
								<td>${essay.title }</td>
								<td>${essay.time }</td>
								<td>${essay.reading }</td>
								<td>${essay.comment }</td>
								<td><c:choose>
										<c:when test="${essay.open}">
											<a class="m-cursor" title="取消发布"
												href="console_blog_close?id=${essay.id }"><span
												class="glyphicon glyphicon-ok"></span></a>
										</c:when>
										<c:otherwise>
											<a class="m-cursor" title="发布"
												href="console_blog_open?id=${essay.id }"><span
												class="glyphicon glyphicon-remove"></span></a>
										</c:otherwise>
									</c:choose></td>
								<td><a title="编辑" class="m-cursor"
									href="console_blog_update?id=${essay.id}"> <span
										class="glyphicon glyphicon-pencil"></span></a> <a title="删除"
									class="m-cursor" onclick="return delete_p()"
									href="console_blog_delete?id=${essay.id}"><span
										class="glyphicon glyphicon-trash"></span></a></td>
							</tr>
						</c:forEach>
					</tbody>
				</table>
			</div>
		</div>
	</div>

	<!-- Bootstrap core JavaScript
    ================================================== -->
	<!-- Placed at the end of the document so the pages load faster -->
	<script src="${rootpath }/js/jquery.min.js"></script>
	<script src="${rootpath }/js/bootstrap.min.js"></script>
	<script src="${rootpath }/js/docs.min.js"></script>
	<!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
	<script src="${rootpath }/js/ie10-viewport-bug-workaround.js"></script>


</body>

</html>